using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using EZCRS.HCMS.DataAcl;
using EZCRS.HCMS.Web;
using EZCRS.HCMS.Bll.baseinfo;

namespace EZCRS.HCMS.Web.manage.carduser
{
    public partial class score_modi : ManageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(typeof(EZCRS.HCMS.myajax.CardUserUtils));
            
            if (!Page.IsPostBack)
            {
                CFun.AddListItems(logsort, EZCRS.HCMS.DataAcl.Common.scorelogsort(), true);
                CFun.AddListItems(avild, EZCRS.HCMS.DataAcl.Common.BoolStatus(), true);
                int Uid = CFun.RequestNumber("uid");
                if (Uid != 0)
                {
                    logsort.SelectedValue = "1";
                    avild.SelectedValue = "1";
                    uid.Value = Uid.ToString();

                    BllAdminInfo adm = new BllAdminInfo();
                    decimal srate = adm.buyscore_rate(BasGroupId);
                    if (srate > 0)
                    {
                        buyscore.Visible = true;
                        scorerate.Text = srate.ToString();
                    }
                    else
                        buyscore.Visible = false;
                }

                bstart.Attributes.Add("onclick", "event.cancelBubble=true;showCalendarTA('bstart',false,'bstart','bstart',null);");
                bend.Attributes.Add("onclick", "event.cancelBubble=true;showCalendarTA('bend',false,'bend','bend',null);");

                bstart.Attributes.Add("onblur", "if(!chkdate(this.value))this.value='yyyy-MM-dd';");
                bend.Attributes.Add("onblur", "if(!chkdate(this.value))this.value='yyyy-MM-dd';");
            }
        }
    }
}
